<?php

namespace app\impl;

use app\common\lib\ZhyxBeanstalkd;
use app\common\lib\ZhyxMongo;
use app\common\model\BaseModel;
use app\common\model\BindDiseasePath;
use app\common\model\DiseasePath;
use app\common\model\DiseasePathBind;
use app\common\model\DiseasePatientTask;
use app\common\model\DiseasePatientTaskDetail;
use app\common\model\DiseaseTask;
use app\common\model\PatientInfo;
use app\interfaces\Task;
use app\common\model\PropagandaEducationHistory as PehModel;
use app\common\model\PushMessage as PmModel;
use catchAdmin\propaganda\service\EdCenterService;
use catchAdmin\registration\service\TaskService;
use catcher\Utils;
use MongoDB\BSON\ObjectId;
use think\Exception;
use think\facade\Log;

class PushProjectExpMessage implements Task
{

    public function run(array $data, string $taskId): ?bool
    {
        try {
            (new EdCenterService())->pushProjectEd($data["answer_id"], $data["ed_id"]);
        } catch (Exception $exception) {
            Log::error("异常问卷推送失败,失败原因:" . $exception->getMessage());
        } finally {
            return true;
        }

    }
}